﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using Core.Model;
using Core.Logic.Implementations;

namespace SocialVoting.Controllers
{
    public class MyPageController : Controller
    {
        //
        // GET: /MyPage/

        public ActionResult Index()
        {
            return View();
        }

        [Authorize(Roles = "User, Admin")]
        public ActionResult MyPage()
        {
            var logic = new UserLogicProvider(new Core.Relations.DataProviderFactory().GetUserDataProvider());
            var user = Membership.GetUser(User.Identity.Name);
            ViewBag.Email = user.Email;            
            return View();
        }
    }
}
